import React from 'react';
import ReactDOM from 'react-dom';
import { Table, Form, Input, Button ,Select, Row, Col, DatePicker, Icon, Tabs  } from 'antd';
const TabPane = Tabs.TabPane;
const FormItem = Form.Item;
const Option = Select.Option;
const RangePicker = DatePicker.RangePicker;
import RoomCostSoft from './roomCostSoft';
import RoomCostOther from './roomCostOther';


let Demo = React.createClass({
  getInitialState() {
    return {
      tenementId:'',
      activeKey:''
    }
  },
  componentDidMount(){
    this.setState({
      tenementId:this.props.location.state.tenementId
    });

  },
  // 切换选项卡
  switchTab(key){
    //this.getKeys(key);
    //this.setState({
    //  tenementId:this.props.location.state.tenementId
    //});
  },
  render () {
    console.log('this.state.tenementId',this.state.tenementId);
    return (
      <div>
        <Tabs onChange={this.switchTab} type="card">
          <TabPane tab="软装项目" key="softDecorateCost">
            <RoomCostSoft tenementId={this.props.location.state.tenementId} roomId={this.props.location.state.id}/>
          </TabPane>
          <TabPane tab="其他项目" key="Cost">
            <RoomCostOther tenementId={this.props.location.state.tenementId} roomId={this.props.location.state.id}/>
          </TabPane>
        </Tabs>


      </div>
    );
  }
});

Demo = Form.create()(Demo);
export default Demo
